<?php
require("db/connect.php");
$sqlinsert="insert into delivery(orders_id,delivery_addr) VALUES (".$_POST["order"].",'".$_POST["deli_addr"]."')";
$queryinsert=mysql_query($sqlinsert);
$sqlinsertdep="insert into deposit(deposit_date,deposit_price,orders_id) values('".date("Y-m-d")."',".$_POST["depositprice"].",".$_POST["order"].")";
mysql_query($sqlinsertdep);
$sqlupdateorder="update orders set orders_status='".$_POST["statusorder"]."' where orders_id=".$_POST["order"]."";
mysql_query($sqlupdateorder);

if($_POST["statusorder"]=="011"){
	$sqlinsertpay="insert into payment(payment_date,orders_id) values('".date("Y-m-d")."',".$_POST["orders"].")";
		mysql_query($sqlinsertpay);
		$sqlupdateorder="update orders set orders_status='011' where orders_id=".$_POST["orders"]."";
	    mysql_query($sqlupdateorder);
	}

?>